import { h } from "vue";
import { NTime } from "naive-ui";

export const columns = [
  {
    type: 'selection'
  },
  {
    title: '名称',
    key: 'name',
    width: 300,
  },
  {
    title: '编码',
    key: 'dictCode',
    width: 100,
  },
  {
    title: '值',
    key: 'value',
    width: 100,
  },
  // {
  //   title: '状态',
  //   key: 'status',
  //   width: 90,
  //   render(row) {
  //     return row.status == 1 ? '可用': '不可用';
  //   },
  // },
  {
    title: '创建时间',
    key: 'createTime',
    width: 100,
    render(row) {
      return h(NTime, {
        time: row.created,
        format: "yyyy-MM-dd hh:mm:ss"
      });
    },
  },
  {
    title: '更新时间',
    key: 'updateTime',
    width: 100,
    render(row) {
      return h(NTime, {
        time: row.created,
        format: "yyyy-MM-dd hh:mm:ss"
      });
    },
  },
];
